# apps/dy/strategies.py
from utils.base_strategies import DeleteStrategy
from .models import DouyinAweme, DouyinAwemeComment

class DouyinDeleteStrategy(DeleteStrategy):
    def delete_content(self, task_id):
        DouyinAweme.objects.filter(task_id=task_id).delete()

    def delete_comments(self, task_id):
        content_ids = DouyinAweme.objects.filter(task_id=task_id).values_list('aweme_id', flat=True)
        DouyinAwemeComment.objects.filter(aweme_id__in=content_ids).delete()